package com.vne.skyemart.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.vne.skyemart.dao.ADUserDao;
import com.vne.skyemart.model.ADUser;
import com.vne.skyemart.service.ADUserService;

@Service("aduserService")
@Transactional(propagation = Propagation.SUPPORTS,readOnly = true)
public class ADUserServiceImpl implements ADUserService{
	@Autowired
	private ADUserDao adUserDao;

	public ADUserDao getAdUserDao() {
		return adUserDao;
	}

	public void setAdUserDao(ADUserDao adUserDao) {
		this.adUserDao = adUserDao;
	}
	
	public ADUserServiceImpl(){
	}
	@Transactional(propagation = Propagation.SUPPORTS,readOnly = false)
	@Override
	public void addADUser(ADUser aduser) {
		adUserDao.save(aduser);		
	}

	@Override
	public List<ADUser> listADUser() {
		return adUserDao.findAll();
	}
	
}
